        <script>
        function showPhongban(){
			// code for IE7+, Firefox, Chrome, Opera, Safari
		    {
		    	str=document.getElementById("dv_id").value;
		    	if (str=="")
		    	  {
		    	  document.getElementById("pb_id").innerHTML="";
		    	  return;
		    	  } 
		    	if (window.XMLHttpRequest)
		    	  {// code for IE7+, Firefox, Chrome, Opera, Safari
		    	  xmlhttp=new XMLHttpRequest();
		    	  }
		    	else
		    	  {// code for IE6, IE5
		    	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		    	  }
		    	xmlhttp.onreadystatechange=function()
		    	  {
		    	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		    	    {
		    	    document.getElementById("pb_id").innerHTML=xmlhttp.responseText;
		    	    }
		    	  }
		    	xmlhttp.open("GET","<?php echo base_url()?>index.php/ajaxci/loadphongban?dv_id="+str,true);
		    	xmlhttp.send();
		    	}
		}
        function showBacluong(){
			// code for IE7+, Firefox, Chrome, Opera, Safari
		    {
		    	str=document.getElementById("nl_id").value;
		    	if (str=="")
		    	  {
		    	  document.getElementById("bl_id").innerHTML="";
		    	  return;
		    	  } 
		    	if (window.XMLHttpRequest)
		    	  {// code for IE7+, Firefox, Chrome, Opera, Safari
		    	  xmlhttp=new XMLHttpRequest();
		    	  }
		    	else
		    	  {// code for IE6, IE5
		    	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		    	  }
		    	xmlhttp.onreadystatechange=function()
		    	  {
		    	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		    	    {
		    	    document.getElementById("bl_id").innerHTML=xmlhttp.responseText;
		    	    }
		    	  }
		    	xmlhttp.open("GET","<?php echo base_url()?>index.php/ajaxci/loadbacluong?nl_id="+str,true);
		    	xmlhttp.send();
		    	}
		}
		</script>
		

<section class="section">
                  <div class="show-error">
          <?php echo validation_errors(); ?>
                  </div>
                  
                  <?php echo form_open('nhanvien/themnhanvien'); ?>
                    <div class="intro-form">
                    	
                        <div class="intro-form-div"><label>Mã nhân viên</label><input type="text" maxlength = "5" id="nv_manv" name="nv_manv" size="5" /></div>
                        <div class="intro-form-div"><label>Ngày nhận vào</label><input type="text" maxlength = "10"  id="nv_ngaynhanvao" name="nv_ngaynhanvao" size="7" /></div>
                        <div class="intro-form-div"><label>Họ và Tên</label><input type="text" id="nv_hoten" name="nv_hoten" size="25" /></div>
                        <div class="intro-form-div"><label>Giới tính</label><input type="radio" name="nv_gioitinh" value="Nam" checked = "checked" />Nam<input type="radio" name="GioiTinh" value="Nu" />Nữ </div>
                        <div class="intro-form-div"><label>Ngày sinh</label><input type="text" id="nv_ngaysinh" name="nv_ngaysinh" size="8" maxlength = "10" /></div>
                        
                        
                        <div class="intro-form-div"><label>Mã số thuế cá nhân</label><input type="text" id="nv_mstcanhan" name="nv_mstcanhan" size="25" /></div>
                        <div class="intro-form-div"><label>Số thẻ ATM</label><input type="text" id="nv_theatm" name="nv_theatm" size="25" /></div>
                        <div class="intro-form-div"><label>Số TK ngân hàng</label><input type="text" id="nv_sotknh" name="nv_sotknh" size="25" /></div>
                        <div class="intro-form-div"><label>Trực tiếp</label><input type="radio" name="nv_tructiep" value="Y"  checked = "checked"/>Có<input type="radio" name="TrucTiep" value="N" />Không</div>
                        
                        
                        <div class="intro-form-div">
                        <label>Là đoàn viên công đoàn</label><input type="radio" name="nv_doanviencongdoan" value="Y" checked = "checked"/>Có<input type="radio" name="nv_doanviencongdoan" value="N" />Không 
                        </div>
                        <div class="intro-form-div">
                        <label>Đang nghỉ hộ sản</label><input type="radio" name="nv_dangnghihosan" value="Y" />Có<input type="radio" name="nv_dangnghihosan" value="N" checked = "checked"/>Không 
                        </div>
                        
                        <div class="intro-form-div"><label>Có người phụ thuộc không</label><input type="radio" name="nv_nguoiphuthuoc" value="Y"  checked = "checked"/>Có&nbsp;<input type="radio" name="nv_nguoiphuthuoc" value="N" />Không </div>
                        <div class="intro-form-div"><label>Có GTGC không</label><input type="radio" name="nv_gtgc" value="Y" />Có&nbsp;<input type="radio" name="nv_gtgc" value="N"  checked = "checked"/>Không </div>
                        <div class="intro-form-div"><label>Miễn nộp thuế BHXH</label><input type="radio" name="nv_miennopbhxh" value="Y" />Có&nbsp;<input type="radio" name="nv_miennopbhxh" value="N"  checked = "checked"/>Không </div>
                        <div class="intro-form-div"><label>Miễn nộp thuế BHYT</label><input type="radio" name="nv_miennopbhyt" value="Y" />Có&nbsp;<input type="radio" name="nv_miennopbhyt" value="N"  checked = "checked"/>Không </div>
                        <div class="intro-form-div"><label>Miễn nộp thuế BHTN</label><input type="radio" name="nv_miennopbhtn" value="Y" />Có&nbsp;<input type="radio" name="nv_miennopbhtn" value="N"  checked = "checked"/>Không </div>                        
                                              
                        
                       
                    </div>
                    <div class="intro-form">
                    	<div class="intro-form-div">
                    		<label>Chọn đơn vị</label>
                    		<select name="dv_id" id="dv_id" onchange = "showPhongban();">
                    			<option>----Chọn đơn vị----</option>
                                <?php 
                                foreach($arrDonvi as $k=>$v){
									echo '<option value = "'.$v['dv_id'].'">'.$v['dv_tendonvi'].'</option>';
								}
                                ?>
                            </select> 
                        </div>	
                    	<div class="intro-form-div">
                    		<label>Chọn Phòng Ban</label>
                    		<select id = "pb_id" name="pb_id">
                                <option>---Chọn phòng ban---</option>
                            </select> 
                        </div>
                        <div class="intro-form-div">
                        	<label>Chức vụ</label>
                            <select name="cv_id">
                            <?php foreach($arrChucvu as $v){
                            	echo '<option value = "'.$v['cv_id'].'">'.$v['cv_chucvu'].'</option>';
                            }
                          	?>
                            </select> 
                        </div>
                        <div class="intro-form-div"><label>Ngạch Lương</label>
                        	<select id="nl_id" name="nl_id" onchange = "showBacluong();">
                        		<option>----Chọn ngạch lương-----</option>
                        		<?php
                        		foreach($arrNgachluong as $Ngachluong)
                        		{
                        			echo '<option value = "'.$Ngachluong['nl_id'].'">'.$Ngachluong['nl_ngachluong'].'</option>';
                        		}
                        			
                        			?>
                        	</select>
                        </div>
                        <div class="intro-form-div">
                        <label>Bậc lương</label>
                            <select name="bl_id" id = "bl_id">
                                <option>----Chọn bậc lương-----</option>
                            </select> 
                        </div>
                        <div class="intro-form-div">
	                        <label>Phụ cấp độc hại</label>
	                        <select name="pcdh_id">
	                            <?php foreach($arrPhucapdochai as $v){
	                            	echo '<option value = "'.$v['pcdh_id'].'">'.$v['pcdh_bac'].'</option>';
	                            }
	                          	?>
	                        </select> 
                       </div>
                       <div class="intro-form-div"><label>Hệ số lương</label><input type="text" id="nv_hesoluong" name="nv_hesoluong" size="15" /></div>
                        
						<div class="intro-form-div"><label>Hệ số chức vụ</label><input type="text" id="nv_hesochucvu" name="nv_hesochucvu" size="10" /></div>
                        <div class="intro-form-div"><label>Hệ số trách nhiệm</label><input type="text" id="nv_hesotrachnhiem" name="nv_hesotrachnhiem" size="10" /></div>
                        <div class="intro-form-div"><label>Hệ số chênh lệch</label><input type="text" id="nv_hesochenhlech" name="nv_hesochenhlech" size="10" /></div>
                        <div class="intro-form-div"><label>Hệ số công ty</label><input type="text" id="nv_hesocongty" name="nv_hesocongty" size="10" /></div>
                        <div class="intro-form-div"><label>Hệ số phụ thuộc</label><input type="text" id="nv_hesophuthuoc" name="nv_hesophuthuoc" size="10" /></div>
                        <div class="intro-form-div"><label>Hệ số phụ cấp lưu động</label><input type="text" id="nv_hesophucapluudong" name="nv_hesophucapluudong" size="10" /></div>
                        <div class="intro-form-div"><label>Ngày xếp lương</label><input type="text" id="nv_ngayxepluong" name="nv_ngayxepluong" size="8" maxlength="10" /></div>
                        <div class="intro-form-div"><label>Trạng thái</label><input type="radio" name="nv_active" value="1"  checked = "checked"/>Kích hoạt&nbsp;<input type="radio" name="nv_active" value="0" />Khóa </div>
                        
                        
                        <div class="intro-form-div"><input type="submit" class="" name="ThemNhanVien" value="Thêm Nhân Viên"/></div>
                    </div>
                      <div class="clear"></div>
                </form>
                
            </section>